package com.ragdollcat.thirdaicodegenerate.service;

import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.service.IService;
import com.ragdollcat.thirdaicodegenerate.common.BaseResponse;
import com.ragdollcat.thirdaicodegenerate.model.dto.app.AppDeployRequest;
import com.ragdollcat.thirdaicodegenerate.model.dto.app.AppQueryRequest;
import com.ragdollcat.thirdaicodegenerate.model.entity.App;
import com.ragdollcat.thirdaicodegenerate.model.entity.User;
import com.ragdollcat.thirdaicodegenerate.model.vo.app.AppVO;
import reactor.core.publisher.Flux;

import java.util.List;

/**
 * 应用 服务层。
 *
 * @author Administrator
 */
public interface AppService extends IService<App> {

    QueryWrapper getQueryWrapper(AppQueryRequest appQueryRequest);

    AppVO getAppVO(App app);

    List<AppVO> getAppVOList(List<App> appList);

    /**
     * 生成应用
     * @param appId
     * @param message
     * @param user
     * @return
     */
    Flux<String> chatToGenCode(Long appId, String message, User user);

    /**
     * 部署应用
     * @param appDeployRequest
     * @param user
     * @return
     */
    BaseResponse<String> deployApp(AppDeployRequest appDeployRequest, User user);
}
